use "shp99_p_user", clear
rename *99 *
rename p99* *
rename i99* *
qui gen year = 1999
save "temp_shp99_p_user.dta", replace

foreach w in 00 01 02  03 04 05 06 07 08 09  {   
use "shp`w'_p_user", clear
rename *`w' *
rename p`w'* *
rename i`w'* *
qui gen year = `w'
qui replace year = 2000 + `w'
save "temp_shp`w'_p_user.dta", replace 
}

use "shp10_p_user.dta", clear
rename p10p10 ideo
rename *10 *
rename p10* *
qui gen year = 2010
save "temp_shp10_p_user.dta", replace

foreach w in 11 12 13 14  {   
use "shp`w'_p_user", clear
rename *`w' *
rename p`w'* *
qui gen year = `w'
qui replace year = 2000 + `w'
save "temp_shp`w'_p_user.dta", replace 
}


